Function.RegisterNamespace("System");

System.Environment=new function(){
    var _strategyManager;

    // Public Members
    this.Strategies;
    
    // ctor
    function Environment(){
        this.Strategies=_strategyManager=new System.Script.Strategy.StrategyManager();
    }
    Environment.apply(this,arguments);
    
    this.Execute=function(command,parameters,voidOutput){
        return _strategyManager.Get(this).Execute(command,parameters,voidOutput);
    };
    
    this.Exit=function(errorCode){
        return _strategyManager.Get(this).Exit(errorCode);
    };

    this.GetNewLine=function(){
        return _strategyManager.Get(this).GetNewLine();
    };

    this.GetParameters=function(){
        return _strategyManager.Get(this).GetParameters();
    };
    
    this.GetWorkingDirectory=function(){
        return _strategyManager.Get(this).GetWorkingDirectory();
    };
    
    this.Write=function(message1,message2,messageN){
        var strategy=_strategyManager.Get(this);
        return strategy.Write.apply(strategy,Array.prototype.slice.call(arguments,0));
    };
    
    this.WriteError=function(message1,message2,messageN){
        var strategy=_strategyManager.Get(this);
        return strategy.WriteError.apply(strategy,Array.prototype.slice.call(arguments,0));
    };
};

System.Environment.constructor.Implement(System.EnvironmentStrategy.IEnvironmentStrategy,'System.Environment');